package org.gkolpu.validation;

import java.util.ArrayList;
import java.util.List;

import org.gkolpu.validation.oval.basetypes.Address;
import org.gkolpu.validation.oval.basetypes.Phone;
import org.gkolpu.validation.oval.basetypes.Request;
import org.gkolpu.validation.oval.basetypes.enums.PhoneType;
import org.junit.Test;

public class OvalValidatorTest {
@Test
	public void testValidate() {

		OvalValidator oval = new OvalValidator();
		oval.validate(createRequest());
		
	}

	public Request createRequest(){
		Request request = new Request();
		request.getEmployee().setAddress(new Address("PCK 5/4", "PL", "Gdynia", "POM", "81-345"));
		request.getEmployee().setFirstName("Grzegorz");
		request.getEmployee().setLastName("Kolpuc");
		
		 List<Phone> phones = new ArrayList<Phone>();
		phones.add(new Phone("543345666", PhoneType.C));
		phones.add(new Phone("543345666", PhoneType.F));
		phones.add(new Phone("543345666", PhoneType.H));
		request.getEmployee().setPhones(phones);
		return request;
	}
}
